<template>
  <c-form-item :label="label" :span="span">
    <el-input v-model="value" :disabled="disabled" :required=required @focus="emit('onFocus')"> </el-input>
  </c-form-item>
</template>
<script>
//参数说明，lable和value，需要表单验证必填prop，
export default {
  props: {
    label: {
      type: String,
      default: ''
    },
    value: {
      type: String,
      default: 'undefined'
    },
    prop: {
      type: String,
      default: null
    },
    placeholder: {
      type: String,
      default: undefined
    },
    required: {
      type: Boolean,
      default: false
    },
    width: {
      type: String
    },
    type: {
      type: String,
      default: undefined
    },
    autocomplete: {
      type: String,
      default: 'on'
    },
    disabled: {
      type: Boolean,
      default: false
    },
    span: {
      type: Number,
      default: 8
    }
  },
  methods: {
    emit(value) {
      this.$emit(value)
    }
  },
  data() {
    return {
      input: '123'
    }
  }
}
</script>
<style scoped>
</style>